﻿#region Using directives
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
#endregion

namespace ProcolDemo {
    public partial class ModifyPersInfo : Page {
        protected void Page_Load(object sender, EventArgs e) {
            if (!Common.IsUserLoggedIn(Session))
                Response.Redirect("Default.aspx");

            Common.FillI18NStrings(this, Session);

            int uidSession = Common.GetUserId(Session);
            int uidRequest = Common.GetUserId(Request);
            myprofile.HRef = String.Format("ViewProfile.aspx?Uid={0}", uidSession);
            myprofile2.HRef = String.Format("ViewProfile.aspx?Uid={0}", uidRequest);

            DateTime tnow = DateTime.Now;
            if (!Page.IsPostBack)
            {
                DropDownYear.Items.Add("Y");
                for (int i = tnow.Year; i >= 1940; i--)
                {
                    var litem = new ListItem(i.ToString());
                    DropDownYear.Items.Add(litem);
                }
                DropDownYear.SelectedIndex = 0;
            }
        }
    }
}